package com.domain;


import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * 用户
 */
public class User implements Serializable {


    private static final long serialVersionUID = 2037730587111860209L;
    //共有属性
    private Integer id;//（非空，注册时不填）
    private String icon;  //头像
    private String name;  //公司名称/人员姓名
    private String tel;  //联系方式(登录账号)
    private String password;  //密码
    private Integer account_state_id;  //账号状态（非空，注册时不填）
    private Integer role_id;  //（非空，注册时需有）
    private String role_name;  //角色名称（非空，注册时不填）
    private Date registration_time;//注册时间（新增）

    //内部人员共有属性
    private Integer department_id;//部门id（非空，注册时需有）
    private String department_name;  //部门名称（非空，注册时不填）
    private String rank_name;//等级名称

    //审核员和设备管理员属性
    private Integer insiderUnit_id;//单位id（新增）
    private String insiderUnit_name;//单位名称（新增）

    //维修师傅/公司共有属性
    private String address;  //公司/维修师傅地址（非空）
    private Integer type_id;//维修类型
    private String type_name;//可承修部门

    //维修公司属性
    private String business_license;//营业执照(非空，只传一张图)
    private String qualification_image;//资质图片(可空，可传多张图)
    private String detail;//描述（非空）


    public User() {
    }


    public Integer getInsiderUnit_id() {
        return insiderUnit_id;
    }

    public void setInsiderUnit_id(Integer insiderUnit_id) {
        this.insiderUnit_id = insiderUnit_id;
    }

    public String getInsiderUnit_name() {
        return insiderUnit_name;
    }

    public void setInsiderUnit_name(String insiderUnit_name) {
        this.insiderUnit_name = insiderUnit_name;
    }

    public Date getRegistration_time() {
        return registration_time;
    }

    public void setRegistration_time(Date registration_time) {
        this.registration_time = registration_time;
    }


    public String getRank_name() {
        return rank_name;
    }

    public void setRank_name(String rank_name) {
        this.rank_name = rank_name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getAccount_state_id() {
        return account_state_id;
    }

    public void setAccount_state_id(Integer account_state_id) {
        this.account_state_id = account_state_id;
    }

    public Integer getRole_id() {
        return role_id;
    }

    public String getType_name() {
        return type_name;
    }

    public void setType_name(String type_name) {
        this.type_name = type_name;
    }

    public void setRole_id(Integer role_id) {
        this.role_id = role_id;
    }

    public String getRole_name() {
        return role_name;
    }

    public void setRole_name(String role_name) {
        this.role_name = role_name;
    }

    public Integer getDepartment_id() {
        return department_id;
    }

    public void setDepartment_id(Integer department_id) {
        this.department_id = department_id;
    }

    public String getDepartment_name() {
        return department_name;
    }

    public void setDepartment_name(String department_name) {
        this.department_name = department_name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getType_id() {
        return type_id;
    }

    public void setType_id(Integer type_id) {
        this.type_id = type_id;
    }

    public String getBusiness_license() {
        return business_license;
    }

    public void setBusiness_license(String business_license) {
        this.business_license = business_license;
    }

    public String getQualification_image() {
        return qualification_image;
    }

    public void setQualification_image(String qualification_image) {
        this.qualification_image = qualification_image;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return Objects.equals(id, user.id) &&
                Objects.equals(icon, user.icon) &&
                Objects.equals(name, user.name) &&
                Objects.equals(tel, user.tel) &&
                Objects.equals(password, user.password) &&
                Objects.equals(account_state_id, user.account_state_id) &&
                Objects.equals(role_id, user.role_id) &&
                Objects.equals(role_name, user.role_name) &&
                Objects.equals(registration_time, user.registration_time) &&
                Objects.equals(department_id, user.department_id) &&
                Objects.equals(department_name, user.department_name) &&
                Objects.equals(rank_name, user.rank_name) &&
                Objects.equals(insiderUnit_id, user.insiderUnit_id) &&
                Objects.equals(insiderUnit_name, user.insiderUnit_name) &&
                Objects.equals(address, user.address) &&
                Objects.equals(type_id, user.type_id) &&
                Objects.equals(type_name, user.type_name) &&
                Objects.equals(business_license, user.business_license) &&
                Objects.equals(qualification_image, user.qualification_image) &&
                Objects.equals(detail, user.detail);
    }

}
